package com.fishery.processing.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;
import java.util.List;

import com.fishery.processing.util.Unchangeable;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 
 * </p>
 *
 * @author ${author}
 * @since 2021-01-14
 */
@ApiModel(value="ProcessingCraft对象", description="加工工艺表")
@TableName(value = "t_processing_craft")
public class Craft implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "工艺编号")
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "工艺名称")
    @NotEmpty(message = "工艺名称不能为空")
    private String craftName;

    @ApiModelProperty(value = "工艺负责人名称")
    @NotEmpty(message = "工艺负责人不能为空")
    private String craftResponsible;

    @ApiModelProperty(value = "工艺描述")
    private String craftDescription;

    @ApiModelProperty(value = "工艺耗时 /s")
    private Long craftTime;

    @ApiModelProperty(value = "所属加工厂编号")
    @NotEmpty(message = "加工厂编号不能为空")
    @Unchangeable
    private String processingFactoryId;

    @ApiModelProperty(value = "乐观锁")
    @Version
    @TableField(fill = FieldFill.INSERT)
    private Integer version;

    @ApiModelProperty(value = "逻辑删除")
    @Unchangeable
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer isDeleted;

    @ApiModelProperty(value = "创建时间")
    @Unchangeable
    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;

    @ApiModelProperty(value = "排序")
    @TableField(exist = false)
    private Integer sort;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCraftName() {
        return craftName;
    }

    public void setCraftName(String craftName) {
        this.craftName = craftName;
    }

    public String getCraftResponsible() {
        return craftResponsible;
    }

    public void setCraftResponsible(String craftResponsible) {
        this.craftResponsible = craftResponsible;
    }

    public String getCraftDescription() {
        return craftDescription;
    }

    public void setCraftDescription(String craftDescription) {
        this.craftDescription = craftDescription;
    }

    public Long getCraftTime() {
        return craftTime;
    }

    public void setCraftTime(Long craftTime) {
        this.craftTime = craftTime;
    }

    public String getProcessingFactoryId() {
        return processingFactoryId;
    }

    public void setProcessingFactoryId(String processingFactoryId) {
        this.processingFactoryId = processingFactoryId;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Date getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    @Override
    public String toString() {
        return "Craft{" +
        "id=" + id +
        ", craftName=" + craftName +
        ", craftResponsible=" + craftResponsible +
        ", craftDescription=" + craftDescription +
        ", craftTime=" + craftTime +
        ", processingFactoryId=" + processingFactoryId +
        ", version=" + version +
        ", isDeleted=" + isDeleted +
        ", gmtCreate=" + gmtCreate +
        ", gmtModified=" + gmtModified +
        "}";
    }
}
